#include <stdio.h>
#include "ofc/DAtExit.h"
#include "ofc/DFile.h"

int main(int argc, char *argv[])
{
  DFile *file = [DFile new];
  
  if ([file open :"example.ini" :"r"])
  {
    [DAtExit add :file];       // If program exit, then automatically call [file free]

    // Read the file ..

    [file close];

    [DAtExit remove :file];    // If program exit, [file free] is not called anymore
  }

  [file free];

  return 0;
}

